package com.hjb.service.impl.app;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hjb.service.app.SiteCompanyService;
import com.hjb.service.domain.SiteCompany.SiteCompany;
import com.hjb.service.mapper.SiteCompanyMapper;

import tk.mybatis.mapper.entity.Example;

@Service
public class SiteCompanyServiceImpl implements SiteCompanyService {
	@Autowired
	private SiteCompanyMapper siteCompanyMapper;
	@Override
	public SiteCompany getSiteCompanyByUserId(SiteCompany siteCompany) {
		Example example = new Example(SiteCompany.class);
		example.createCriteria().andEqualTo("brokerUserId", siteCompany.getBrokerUserId());
		List<SiteCompany> list = siteCompanyMapper.selectByExample(example);
		return list.get(0);
	}

}
